package org.example.completed.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Select;
import org.example.completed.domain.Active;

import java.util.List;

@Mapper
public interface ActiveMapper extends BaseMapper<Active> {

    // 获取所有活动
    @Select("SELECT id, name, image_url,description FROM activity")
    // 增加类型强
    @Result(property = "image_url", column = "image_url")
    List<Active> getAllActive();
}
